#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>

class UtilityString
{
public:
	UtilityString(void);
	UtilityString(char* str1);
	UtilityString(wchar_t* wStr1);
	UtilityString(UtilityString& uStr1);
	virtual ~UtilityString(void);

	void SetCharStr(char* str1);
	void SetWCharStr(wchar_t* wStr1);
	inline char* GetCharStr() {return m_strContent;}
	inline int GetStrLens() {return m_iStrLens;}
	wchar_t* GetWCharStr();
	void replaceExt(char* strExt);
	void ConcatenateStr(char* str1);
	void ConcatenateWStr(wchar_t* wStr1);
	void ConcatenateUtilityStr(UtilityString& uStr1);
	//utility
	int SearchSubStringFirstOccurrence(char* str1);
	int Remove1LevelSubDirectory();
	int GenerateFormatSmallString(const char* format, ...);

protected:
	char* m_strContent;
	wchar_t* m_wstrContent;
	int  m_iStrLens;

private:
	void RelocateMemory(int iNewSize);
};

